import { axios } from "@/request/request";
/**
 * 注册用户
 * @method register
 * @param {params} 用户基本信息
 */
export const register = (params) =>{
    return axios({
        url:"/register",
        method:'post',
        data:params
    })
}

/**
 * 判断用户名或者手机号是否注册
 * @method isRegisted
 * @param {String} type 判断类型
 * @param {String} verfieditem 校验的值
 */
export const isRegisted = (params) =>{
    return axios({
        url:`/isRegister?type=${params.type}&verfieditem=${params.verfieditem}`,
        method:'get',
    })
}

/**
 * 改变密码
 * @method isRegisted
 * @param {String} username 用户名
 * @param {String} password 密码
 */
export const changePassword = (params) =>{
    return axios({
        url:`/changePassword`,
        method:'post',
        data:params
    })
}